package com.cysyz.web.modules.base.permission.domain;


import com.cysyz.mylib.domain.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * SysSysrolePrivilege entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "FNM_SYS_SYSROLE_PRIVILEGE", uniqueConstraints = {@UniqueConstraint(columnNames={"privilege_id","role_id"})})
public class SysSysrolePrivilege extends BaseEntity {

	// Fields

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "PRIVILEGE_ID", nullable = false, updatable = false)
	private SysPrivilege sysPrivilege;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "ROLE_ID", nullable = false, updatable = false)
	private SysRole sysRole;

	// Constructors

	/** default constructor */
	public SysSysrolePrivilege() {
	}



	public SysPrivilege getSysPrivilege() {
		return this.sysPrivilege;
	}

	public void setSysPrivilege(SysPrivilege sysPrivilege) {
		this.sysPrivilege = sysPrivilege;
	}

	public SysRole getSysRole() {
		return this.sysRole;
	}

	public void setSysRole(SysRole sysRole) {
		this.sysRole = sysRole;
	}

}